﻿using System.Windows;
using ProjektSeminarDemo.ServiceReference;

namespace ProjektSeminarDemo
{
    public partial class MainWindow
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void ButtonCloseClick(object sender, RoutedEventArgs e)
        {
            Close();
        }

        private void ButtonSendClick(object sender, RoutedEventArgs e)
        {
            var num1 = double.Parse(textBoxInput1.Text);
            var num2 = double.Parse(textBoxInput2.Text);

            //Consuming the service
            var serviceClient = new CalculateServiceClient();
            var result = serviceClient.AddTwoNumbers(num1, num2);
            textBlockResult.Text = result.ToString();
        }
    }
}